<?php
	include_once "menu_db.php";
	
	class menu_bs
	{
		//--------------Field---------------
		private $MaMenu = 0;
		public function SetMaMenu($MaMenu)         { $this->MaMenu = $MaMenu;         }
		public function GetMaMenu()                { return $this->MaMenu;            }
		
		private $MaLoaiMenu = -1;
		public function SetMaLoaiMenu($MaLoaiMenu) { $this->MaLoaiMenu = $MaLoaiMenu; }
		public function GetMaLoaiMenu()            { return $this->MaLoaiMenu;        }
		
		private $TenMenu = "";
		public function SetTenMenu($TenMenu)       { $this->TenMenu = $TenMenu;       }
		public function GetTenMenu()               { return $this->TenMenu;           }
		
		private $MoTa = "";
		public function SetMoTa($MoTa)             { $this->MoTa = $MoTa;             }
		public function GetMoTa()                  { return $this->MoTa;              }
		
		private $MaChuDe = 0;
		public function SetMaChuDe($MaChuDe)       { $this->MaChuDe = $MaChuDe;       }
		public function GetMaChuDe()               { return $this->MaChuDe;           }
		
		private $Link = "";
		public function SetLink($Link)             { $this->Link = $Link;             }
		public function GetLink()                  { return $this->Link;              }
		
		private $Current = -1;
		public function SetCurrent($Current)       { $this->Current = $Current;       }
		public function GetCurrent()               { return $this->Current;           }
		
		private $TrangThai = -1;
		public function SetTrangThai($TrangThai)   { $this->TrangThai = $TrangThai;   }
		public function GetTrangThai()             { return $this->TrangThai;         }
		
		private $Index = -1;
		public function SetIndex($Index)           { $this->Index = $Index;           }
		public function GetIndex()                 { return $this->Index;             }
		
		private $PIN = "";
		public function SetPIN($PIN)               { $this->PIN = $PIN;               }
		public function GetPIN()                   { return $this->PIN;               }
		
		//--------------Method---------------
		public function Them()
		{
			$data = new menu_db();
			return $data->Them($this->MaMenu, $this->TenMenu, $this->Link, $this->Current, $this->Index);
		}
		
		public function CapNhat()
		{
			$data = new menu_db();
			return $data->CapNhat($this->MaMenu, $this->TenMenu, $this->Link, $this->Current, $this->Index);
		}
		
		public function CapNhatPIN()
		{
			$data = new menu_db();
			return $data->CapNhatPIN($this->MaMenu, $this->PIN);
		}
		public function CapNhatIndex()
		{
			$data = new menu_db();
			return $data->CapNhatIndex($this->MaMenu, $this->Index);
		}
		
		public function CapNhatTrangThai()
		{
			$data = new menu_db();
			return $data->CapNhatTrangThai($this->MaMenu, $this->TrangThai);
		}
		
		public function ChonCurrent()
		{
			$data = new menu_db();
			return $data->ChonCurrent($this->MaMenu, $this->Current);
		}
		
		public function Xoa()
		{
			$data = new menu_db();
			return $data->Xoa($this->MaMenu);
		}
		
		public function LayDanhSach()
		{
			$data = new menu_db();
			return $data->LayDanhSach($this->MaMenu, $this->TrangThai);
		}
		
		public function MaxIndex()
		{
			$data = new menu_db();
			return $data->MaxIndex();
		}
	}
?>